package com.mediacloud.app.newsmodule.fragment.activity

import android.os.Bundle
import com.mediacloud.app.model.activity.BaseBackActivity
import com.mediacloud.app.model.news.CatalogItem
import com.mediacloud.app.newsmodule.R
import com.mediacloud.app.newsmodule.fragment.MagazineFragment

/**
 * 杂志导航独立页面
 * wy
 * */
class MagezineActivity : BaseBackActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        val fragment = MagazineFragment()
        val transaction = supportFragmentManager.beginTransaction()
        transaction.replace(R.id.mageFragmentContainer, fragment)

        val bundle = Bundle()
        bundle.putString("id",intent.getStringExtra("catalogID"))
        setTitle(intent.getStringExtra("title"))
        fragment.arguments = bundle
        transaction.show(fragment)
        transaction.commitNowAllowingStateLoss()
    }

    override fun getLayoutResID(): Int {
        return R.layout.activity_magezine
    }
}